Optimal. Leaf size=25 \[ \frac {\tanh ^{-1}\left (\frac {\sqrt {2} \tanh (x)}{\sqrt {1+\tanh ^2(x)}}\right )}{\sqrt {2}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.01, antiderivative size = 25, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.300, Rules used = {3742, 385, 212}
\begin {gather*} \frac {\tanh ^{-1}\left (\frac {\sqrt {2} \tanh (x)}{\sqrt {\tanh ^2(x)+1}}\right )}{\sqrt {2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 385
Rule 3742
Rubi steps
\begin {align*} \int \frac {1}{\sqrt {1+\tanh ^2(x)}} \, dx &=\text {Subst}\left (\int \frac {1}{\left (1-x^2\right ) \sqrt {1+x^2}} \, dx,x,\tanh (x)\right )\\ &=\text {Subst}\left (\int \frac {1}{1-2 x^2} \, dx,x,\frac {\tanh (x)}{\sqrt {1+\tanh ^2(x)}}\right )\\ &=\frac {\tanh ^{-1}\left (\frac {\sqrt {2} \tanh (x)}{\sqrt {1+\tanh ^2(x)}}\right )}{\sqrt {2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.02, size = 35, normalized size = 1.40 \begin {gather*} \frac {\sinh ^{-1}\left (\sqrt {2} \sinh (x)\right ) \sqrt {\cosh (2 x)} \text {sech}(x)}{\sqrt {2} \sqrt {1+\tanh ^2(x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(61\) vs.
\(2(20)=40\).
time = 0.93, size = 62, normalized size = 2.48
method | result | size |
derivativedivides | \(-\frac {\sqrt {2}\, \arctanh \left (\frac {\left (2-2 \tanh \left (x \right )\right ) \sqrt {2}}{4 \sqrt {\left (1+\tanh \left (x \right )\right )^{2}-2 \tanh \left (x \right )}}\right )}{4}+\frac {\sqrt {2}\, \arctanh \left (\frac {\left (2+2 \tanh \left (x \right )\right ) \sqrt {2}}{4 \sqrt {\left (\tanh \left (x \right )-1\right )^{2}+2 \tanh \left (x \right )}}\right )}{4}\) | \(62\) |
default | \(-\frac {\sqrt {2}\, \arctanh \left (\frac {\left (2-2 \tanh \left (x \right )\right ) \sqrt {2}}{4 \sqrt {\left (1+\tanh \left (x \right )\right )^{2}-2 \tanh \left (x \right )}}\right )}{4}+\frac {\sqrt {2}\, \arctanh \left (\frac {\left (2+2 \tanh \left (x \right )\right ) \sqrt {2}}{4 \sqrt {\left (\tanh \left (x \right )-1\right )^{2}+2 \tanh \left (x \right )}}\right )}{4}\) | \(62\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 543 vs.
\(2 (20) = 40\).
time = 0.36, size = 543, normalized size = 21.72 \begin {gather*} \frac {1}{8} \, \sqrt {2} \log \left (-\frac {2 \, {\left (\cosh \left (x\right )^{8} + 8 \, \cosh \left (x\right ) \sinh \left (x\right )^{7} + \sinh \left (x\right )^{8} + {\left (28 \, \cosh \left (x\right )^{2} - 3\right )} \sinh \left (x\right )^{6} - 3 \, \cosh \left (x\right )^{6} + 2 \, {\left (28 \, \cosh \left (x\right )^{3} - 9 \, \cosh \left (x\right )\right )} \sinh \left (x\right )^{5} + 5 \, {\left (14 \, \cosh \left (x\right )^{4} - 9 \, \cosh \left (x\right )^{2} + 1\right )} \sinh \left (x\right )^{4} + 5 \, \cosh \left (x\right )^{4} + 4 \, {\left (14 \, \cosh \left (x\right )^{5} - 15 \, \cosh \left (x\right )^{3} + 5 \, \cosh \left (x\right )\right )} \sinh \left (x\right )^{3} + {\left (28 \, \cosh \left (x\right )^{6} - 45 \, \cosh \left (x\right )^{4} + 30 \, \cosh \left (x\right )^{2} - 4\right )} \sinh \left (x\right )^{2} - 4 \, \cosh \left (x\right )^{2} + 2 \, {\left (4 \, \cosh \left (x\right )^{7} - 9 \, \cosh \left (x\right )^{5} + 10 \, \cosh \left (x\right )^{3} - 4 \, \cosh \left (x\right )\right )} \sinh \left (x\right ) + {\left (\sqrt {2} \cosh \left (x\right )^{6} + 6 \, \sqrt {2} \cosh \left (x\right ) \sinh \left (x\right )^{5} + \sqrt {2} \sinh \left (x\right )^{6} + 3 \, {\left (5 \, \sqrt {2} \cosh \left (x\right )^{2} - \sqrt {2}\right )} \sinh \left (x\right )^{4} - 3 \, \sqrt {2} \cosh \left (x\right )^{4} + 4 \, {\left (5 \, \sqrt {2} \cosh \left (x\right )^{3} - 3 \, \sqrt {2} \cosh \left (x\right )\right )} \sinh \left (x\right )^{3} + {\left (15 \, \sqrt {2} \cosh \left (x\right )^{4} - 18 \, \sqrt {2} \cosh \left (x\right )^{2} + 4 \, \sqrt {2}\right )} \sinh \left (x\right )^{2} + 4 \, \sqrt {2} \cosh \left (x\right )^{2} + 2 \, {\left (3 \, \sqrt {2} \cosh \left (x\right )^{5} - 6 \, \sqrt {2} \cosh \left (x\right )^{3} + 4 \, \sqrt {2} \cosh \left (x\right )\right )} \sinh \left (x\right ) - 4 \, \sqrt {2}\right )} \sqrt {\frac {\cosh \left (x\right )^{2} + \sinh \left (x\right )^{2}}{\cosh \left (x\right )^{2} - 2 \, \cosh \left (x\right ) \sinh \left (x\right ) + \sinh \left (x\right )^{2}}} + 4\right )}}{\cosh \left (x\right )^{6} + 6 \, \cosh \left (x\right )^{5} \sinh \left (x\right ) + 15 \, \cosh \left (x\right )^{4} \sinh \left (x\right )^{2} + 20 \, \cosh \left (x\right )^{3} \sinh \left (x\right )^{3} + 15 \, \cosh \left (x\right )^{2} \sinh \left (x\right )^{4} + 6 \, \cosh \left (x\right ) \sinh \left (x\right )^{5} + \sinh \left (x\right )^{6}}\right ) + \frac {1}{8} \, \sqrt {2} \log \left (\frac {2 \, {\left (\cosh \left (x\right )^{4} + 4 \, \cosh \left (x\right ) \sinh \left (x\right )^{3} + \sinh \left (x\right )^{4} + {\left (6 \, \cosh \left (x\right )^{2} + 1\right )} \sinh \left (x\right )^{2} + \cosh \left (x\right )^{2} + 2 \, {\left (2 \, \cosh \left (x\right )^{3} + \cosh \left (x\right )\right )} \sinh \left (x\right ) + {\left (\sqrt {2} \cosh \left (x\right )^{2} + 2 \, \sqrt {2} \cosh \left (x\right ) \sinh \left (x\right ) + \sqrt {2} \sinh \left (x\right )^{2} + \sqrt {2}\right )} \sqrt {\frac {\cosh \left (x\right )^{2} + \sinh \left (x\right )^{2}}{\cosh \left (x\right )^{2} - 2 \, \cosh \left (x\right ) \sinh \left (x\right ) + \sinh \left (x\right )^{2}}} + 1\right )}}{\cosh \left (x\right )^{2} + 2 \, \cosh \left (x\right ) \sinh \left (x\right ) + \sinh \left (x\right )^{2}}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {1}{\sqrt {\tanh ^{2}{\left (x \right )} + 1}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 58 vs.
\(2 (20) = 40\).
time = 0.42, size = 58, normalized size = 2.32 \begin {gather*} -\frac {1}{4} \, \sqrt {2} {\left (\log \left (\sqrt {e^{\left (4 \, x\right )} + 1} - e^{\left (2 \, x\right )} + 1\right ) + \log \left (\sqrt {e^{\left (4 \, x\right )} + 1} - e^{\left (2 \, x\right )}\right ) - \log \left (-\sqrt {e^{\left (4 \, x\right )} + 1} + e^{\left (2 \, x\right )} + 1\right )\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.17, size = 63, normalized size = 2.52 \begin {gather*} \frac {\sqrt {2}\,\left (\ln \left (\mathrm {tanh}\left (x\right )+1\right )-\ln \left (\sqrt {2}\,\sqrt {{\mathrm {tanh}\left (x\right )}^2+1}-\mathrm {tanh}\left (x\right )+1\right )\right )}{4}+\frac {\sqrt {2}\,\left (\ln \left (\mathrm {tanh}\left (x\right )+\sqrt {2}\,\sqrt {{\mathrm {tanh}\left (x\right )}^2+1}+1\right )-\ln \left (\mathrm {tanh}\left (x\right )-1\right )\right )}{4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________